import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")
    Row {
        id: row
        RadioButton {
            checked: true
            text: '火锅'
        }
        RadioButton {
            text: '自助'
        }
        RadioButton {
            text: '点菜'
        }
    }
    Column {
        id: column
        anchors.top: row.bottom
        anchors.topMargin: 10
        RadioButton {
            checked: true
            text: '火锅'
        }
        RadioButton {
            text: '自助'
        }
        RadioButton {
            text: '点菜'
        }
    }
    Grid {
        id: grid
        anchors.top: column.bottom
        anchors.topMargin: 10
        columns: 3
        spacing: 2
        Rectangle { color: "red"; width: 50; height: 50 }
        Rectangle { color: "green"; width: 20; height: 50 }
        Rectangle { color: "blue"; width: 50; height: 20 }
        Rectangle { color: "cyan"; width: 50; height: 50 }
        Rectangle { color: "magenta"; width: 10; height: 10 }
    }

    StackLayout {
        id: stacklayout
        anchors.top: grid.bottom
        anchors.topMargin: 10
        currentIndex: 1
        Rectangle {
            color: 'teal'
            implicitWidth: 200
            implicitHeight: 200
        }
        Rectangle {
            color: 'plum'
            implicitWidth: 300
            implicitHeight: 200
        }
    }

    Flow {
        anchors.left: column.right
        anchors.top: row.bottom
        anchors.margins: 40
        spacing: 10
        Text { text: "Text"; font.pixelSize: 40 }
        Text { text: "items"; font.pixelSize: 40 }
        Text { text: "flowing"; font.pixelSize: 40 }
        Text { text: "inside"; font.pixelSize: 40 }
        Text { text: "a"; font.pixelSize: 40 }
    }
}
